package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Strategy record);

    Strategy selectByPrimaryKey(Long id);

    List<Strategy> selectAll();

    List<Strategy> selectForList(QueryObject qo);

    int updateByPrimaryKey(Strategy record);

    Strategy selectStrategyByKeyWord(QueryObject qo);

    Integer selectLikeCount(Long strategyId);

    void updateLikeCount(@Param("likeCount") int likeCount, @Param("strategyId") Long strategyId);

    Integer selectCollectCount(Long strategyId);

    void updateCoolectCount(@Param("collectCount") int collectCount, @Param("strategyId") Long strategyId);

}